#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>  

#define OFFSETOF(type,member) (int)&(((type*)0)->member)

struct S 
{
	int a;
	char b[10];
	int c;
};

int main()
{
	printf("a:%d\n", OFFSETOF(struct S, a));
	printf("b:%d\n", OFFSETOF(struct S, b));
	printf("c:%d\n", OFFSETOF(struct S, c));

	return 0;
}